<?php 
namespace Builder\Test;
use PHPUnit\Framework\TestCase;
use Builder\TruckBuilder;
use Builder\Director;
use Builder\parts\Truck;
use Builder\CarBuilder;
use Builder\parts\Car;
class DirectorTest extends TestCase
{
    public function testCanBuildTruck()
    {
        $truckBuilder=new TruckBuilder();
        $newVehicle =(new Director())->build($truckBuilder);
        $this->assertInstanceOf(Truck::class, $newVehicle);
    }
    
    public function testCanBuildCar()
    {
        $carBuilder=new CarBuilder();
        $newVehicle=(new Director())->build($carBuilder);
        $this->assertInstanceOf(Car::class, $newVehicle);
    }
}